package com.tianji.promotion.service;

import com.tianji.common.domain.dto.PageDTO;
import com.tianji.promotion.domain.dto.CouponDiscountDTO;
import com.tianji.promotion.domain.dto.OrderCouponDTO;
import com.tianji.promotion.domain.dto.OrderCourseDTO;
import com.tianji.promotion.domain.po.Coupon;
import com.tianji.promotion.domain.po.ExchangeCode;
import com.tianji.promotion.domain.po.UserCoupon;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.promotion.domain.query.UserCouponQuery;
import com.tianji.promotion.domain.vo.UserCouponPageVO;

import java.util.List;

/**
 * <p>
 * 用户领取优惠券的记录，是真正使用的优惠券信息 服务类
 * </p>
 *
 * @author hrz
 * @since 2025-09-02
 */
public interface IUserCouponService extends IService<UserCoupon> {

    void receiveCoupon(Long id);

    void exchangeCoupon(String code);
    void updateCouponAndCode(Long couponId, Integer serialNum ,Long userId);

    void updateCouponAndCodeNew(Long couponId, Long userId);

    PageDTO<UserCouponPageVO> queryPage(UserCouponQuery query);

    List<CouponDiscountDTO> queryAvailableCoupons(List<OrderCourseDTO> courses);

    CouponDiscountDTO queryCouponDiscount(OrderCouponDTO orderCouponDTO);

    void useCoupon(List<Long> couponIds);

    void refundCoupon(List<Long> userCouponIds);

    List<String> queryDiscountRules(List<Long> userCouponIds);
}
